# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=totem-plparser
pkgver=3.26.1+2+gb7f36dd
pkgrel=1
pkgdesc="Simple GObject-based library to parse and save a host of playlist formats"
url="https://gitlab.gnome.org/GNOME/totem-pl-parser"
license=(LGPL)
arch=(x86_64)
depends=(libarchive libquvi libxml2)
makedepends=(gobject-introspection git gtk-doc meson)
checkdepends=(gvfs)
_commit=b7f36dd71ee0ddfff04be1e90a654ddf13293d0f  # master
source=("git+https://gitlab.gnome.org/GNOME/totem-pl-parser.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd totem-pl-parser
  git describe --tags | sed 's/^V_//;s/_/./g;s/-/+/g'
}

prepare() {
  cd totem-pl-parser
}

build() {
  arch-meson totem-pl-parser build -D enable-gtk-doc=true
  ninja -C build
}

check() {
  meson test -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
